%!TEX program = xelatex
%!TEX encoding = UTF-8 Unicode
\documentclass{mimosis}

\usepackage{metalogo}

\usepackage{xeCJK_ganx}
%\usepackage[scheme=plain]{ctex}
\usepackage{notation_ganx}
\usepackage[normalem]{ulem}
\usepackage{todonotes_ganx}
\usepackage{chngcntr}
% Numering of equations is by the whole work.
\counterwithout{equation}{chapter}
\counterwithout{figure}{chapter}
% Define theorem environment.
\theoremstyle{plain}% default
\newtheorem{thm}{Theorem}%[section]
\newtheorem{lem}[thm]{Lemma}
\newtheorem{prop}[thm]{Proposition}
\newtheorem*{cor}{Corollary}
% Define ones in definition style.
\theoremstyle{definition}
\newtheorem{defn}{Definition}%[section]
\newtheorem{exmp}{Example}%[section]
\newtheorem{xca}[exmp]{Exercise}
% Define ones in remark style.
\theoremstyle{remark}
\newtheorem*{rem}{Remark}
\newtheorem*{note}{Note}
\newtheorem{case}{Case}

\graphicspath{{figures/}{logo/}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Some of my favourite personal adjustments
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% These are the adjustments that I consider necessary for typesetting
% a nice thesis. However, they are *not* included in the template, as
% I do not want to force you to use them.

% This ensures that I am able to typeset bold font in table while still aligning the numbers
% correctly.
\usepackage{etoolbox}

\usepackage{bookmark}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Bibliography
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% I like the bibliography to be extremely plain, showing only a numeric
% identifier and citing everything in simple brackets. The first names,
% if present, will be initialized. DOIs and URLs will be preserved.


\usepackage[%
  autocite     = plain,
  backend      = biber,
  doi          = true,
  url          = false,
  % giveninits   = true,
  hyperref     = true,
  maxbibnames  = 99,
  % maxcitenames = 99,
  maxcitenames = 2,
  % sortcites    = true,
  % style        = numeric,
  style        = authoryear,
  natbib       = true,
  uniquename   = false,
  uniquelist   = false,
  ]{biblatex}

% \input{bibliography-mimosis}
\addbibresource{sutton_learning_1988_biblatex.bib}

% Remove comma between author and year
% Ref: https://tex.stackexchange.com/a/149320/104838
\DeclareDelimFormat{nameyeardelim}{\addspace}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Fonts
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\ifxetexorluatex
  \setmainfont{Minion Pro}
\else
  \usepackage[lf]{ebgaramond}
  \usepackage[oldstyle,scale=0.7]{sourcecodepro}
  \singlespacing
\fi

\renewcommand{\th}{\textsuperscript{\textup{th}}\xspace}

\newacronym{sl}{SL}{supervised-learning}
\newacronym{td}{TD}{temporal-difference}

\makeindex
\makeglossaries

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Incipit
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\title{\texttt{Learning to Predict by the Methods of Temporal Differences}}
\subtitle{Machine Learning 3, no. 1 (August 1988): 9–44}
\author{RICHARD S. SUTTON}

\begin{document}

\frontmatter

  \input{Sources/Title}
  %\include{Sources/Abstract}

  \tableofcontents

\mainmatter

  \input{Sources/Introduction}
  \input{Sources/Literature}
  \input{Sources/Model}
  \input{Sources/Model2}

% This ensures that the subsequent sections are being included as root
% items in the bookmark structure of your PDF reader.
\bookmarksetup{startatroot}
\backmatter

  \begingroup
    \let\clearpage\relax
    \glsaddall
    \printglossary[type=\acronymtype]
    \newpage
    \printglossary
  \endgroup

  \printindex
  \printbibliography

\end{document}
